Repository navigation
merge: sync upstream main (a3ba5df6) into fork - #78
Merged
Merged
Conversation
appaudit reads Go source and points at what keeps an application busy with nothing to do or stalls its window thread: a time.NewTicker or time.Tick, a file-system call in a function handed a canvas, a page or a draw context, and a RequestFrameIn of a frame or less with no condition (an if, a loop or an early return) around it. A line that does it on purpose says why with //appaudit:allow <reason>. It is a heuristic: a finding is a place to look. Viva runs it over itself in CI; its one ticker, the development reload host's source scan, says why. Motty runs it in its companion commit, where it would have caught the two polling loops that commit's predecessors replaced with notifications.
Brings in the five upstream commits after a1af758: - 086247a feat(ui): let text fields inspect a paste before taking it (vivaui#505, same as fork #76) - a3eda45 fix(base): keep a text that fits exactly when rounding falls short (vivaui#507, fork #77 plus the across-the-flow case) - fcf7cba perf(markdown): index MarkdownView paint and hit testing (vivaui#489) - a3ba5df feat(video): add shared-texture video playback and GIF/APNG decoders (vivaui#508) - b036c88 feat(tools): audit applications for idle wakes and window-thread I/O Conflicts, all from fcf7cba against the fork's own markdown index (fork #70, #73): - components/markdown.go, components/markdown_index.go and their cmd/viva templates, cmd/viva/components_gen.go: upstream's version is the fork's with the fork-only parts taken out (Labeled blocks, MarkdownView.AllocatedBytes, BlockAnchorTop); upstream adds no line of its own, so the fork's version is kept. Lithe uses all three. - components/markdown_index_test.go: upstream's tests, with the fork's programmatic Labeled case added to the linear-reference grid and the fork's three builder tests (Labeled and opaque links, AppendTable tall cell, quoted AppendParagraph) kept.
This was referenced Nov 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
把上游
vivaui/vivamain同步进Lithe-IDEA/Lithe-vivamain:上游从 fork 已包含的a1af7583(#75)前进到a3ba5df6,共 5 个提交。之后 Lithe 把固定版本从 fork #76 的分支 head04cd1f62换回 forkmain。带进来的上游改动
086247ad:TextField/TextArea的Box.OnPaste(feat(ui): let a text field look at a paste before it takes it vivaui/viva#505)。与 fork feat(ui): let a text field look at a paste before it takes it #76 的04cd1f62是同一个改动,合并后这几处文件与 feat(ui): let a text field look at a paste before it takes it #76 逐字相同。Lithe 的 Agent 输入框正在用它,调用点不用改。合入后关闭 feat(ui): let a text field look at a paste before it takes it #76。a3eda457:容器按自己测出的宽度排版时,刚好放得下的文字不再被截成省略号(fix(base): keep a text that fits exactly when float32 rounding falls short vivaui/viva#507)。它比 fork fix(base): keep a text that fits exactly when float32 rounding falls short #77 多处理了一种情况:容器和排版方向垂直时(例如 Column 里的标签),由减内边距带来的取整误差。测试也相应扩展。合入后关闭 fix(base): keep a text that fits exactly when float32 rounding falls short #77。fcf7cba5:MarkdownView绘制与命中测试的空间索引(perf(markdown): add hierarchical spatial paint and hit-test index for MarkdownView vivaui/viva#489),是 fork feat(markdown): add Labeled blocks, programmatic Document builder, and spatial paint index #70 / fix(markdown): widen within cell on empty code lines in offsetAtIndexed and add linear equivalence tests #73 索引部分的上游版本。a3ba5df6:原生共享纹理的视频播放与 GIF/APNG 解码,新增ui/video(feat(video): add native shared-texture video playback and GIF/APNG decoders vivaui/viva#508)。b036c884:tools/appaudit,审计应用的空闲唤醒和窗口线程 I/O。冲突
6 个冲突文件都来自
fcf7cba5和 fork 自己的 Markdown 索引(#70、#73)。components/markdown.go、components/markdown_index.go、对应的cmd/viva/templates/*.txt、cmd/viva/components_gen.go:上游版本是在 fork 版本基础上去掉了 fork 独有的部分,即 Labeled 块的绘制、MarkdownView.AllocatedBytes()、BlockAnchorTop()。上游相对 fork 没有新增一行,所以保留 fork 版本;结果等于“上游 + 我们的补丁”。Lithe 的文档注释(editorview/docblocks.go)这三样都在用。go generate ./cmd/viva之后模板没有差异。components/markdown_index_test.go:以上游测试为准,再补上 fork 独有功能的覆盖:AppendTable的超高单元格、带引用层级的AppendParagraph。它们是构建器 API 仅有的测试。fork 独有的 Labeled 块、
markdown.Document构建器、AllocatedBytes/BlockAnchorTop还没有进上游,仍是我们的补丁。验证(macOS Apple Silicon,go1.27.4)
gofmt -l components cmd/viva:没有输出go generate ./cmd/viva:没有差异GOOS=windows GOARCH=amd64 go build ./...、GOOS=windows GOARCH=arm64 go build ./...GOOS=linux CGO_ENABLED=0 go vet ./base/ ./ui/ ./components/ ./gfx/ ./markdown/ ./ui/video/go test ./... -count=1:app、base、components、markdown、ui、ui/video、window、tools/docs、tools/appaudit、internal/media等全部通过。失败的只有既有的两类,与本次同步无关:ui/inputnumber、internal/gallery、internal/componentdemo的暖绘制零分配测试:go1.27 下strconv.FormatFloat会分配(ui/inputnumber:Go 1.27 下暖绘制每帧分配一次(decimals 里的 strconv.FormatFloat) vivaui/viva#506)cmd/viva的打包测试:本机部署目标和测试里的min_system不一致,属于环境问题合入方式:Create a merge commit(不 squash)。